#ifndef TASK_H_
#define TASK_H_

using namespace std;

class Task{
public:
	virtual void* run(void* arg)=0;
};

class DummyTask : public Task{
protected:
	long Id;
public:
	//long x,y;  // "placeholders" for memory debug
	//long producerId; // id of the producer that created the task - for debug 
	
	/* insertion time fields. updated by the producer prior to insertion into container */
	unsigned long insertionTime_sec;
	unsigned long insertionTime_ns;
	
	/* constructors */
	DummyTask():Id(0),insertionTime_sec(0),insertionTime_ns(0){/*x = 0; y = 0; producerId = -1;*/}
	DummyTask(int id)
	{
		//x = y = 0;
		//producerId = -1;
		this->Id = id;
		insertionTime_sec = insertionTime_ns = 0;
	}
	
	long getId(){return Id;}
	
	void* run(void* arg){
		/*
		// some dummy computation
		int x = 0;
		for(int i = 0; i < 5000; i++)
		{
			x += i;
		}
		*/
		return NULL;
	}
	
	virtual ~DummyTask(){}
};
#endif
